package pl.edu.mimuw.mas.editor.listener;

import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;

import pl.edu.mimuw.mas.editor.MainEditorWindow;

/**
 * Ustawia widoczność wizualizacji na całe okno.
 */
public class ToggleFullScr3DMenuItemListener implements SelectionListener {
	private final MainEditorWindow window;
	private boolean maximized = false;
	
	public ToggleFullScr3DMenuItemListener(MainEditorWindow window, boolean maximized) {
		this.window = window;
		this.maximized = maximized;
		
		window.maximize3D(maximized);
	}

	public void widgetSelected(SelectionEvent arg0) {
		maximized = !maximized;
		window.maximize3D(maximized);	
	}

	public void widgetDefaultSelected(SelectionEvent arg0) {
	}
}
